/* 
 * File:   BlendingMethodManager.h
 * Author: RedEyedKiller
 *
 * Created on 7 Οκτώβριος 2011, 1:20 πμ
 */

#ifndef BLENDINGMETHODMANAGER_H
#define	BLENDINGMETHODMANAGER_H

#include "BlendingMethod.h"
#include <string>

namespace gl
{

/**
 * Manages different BlendingMethods by storing enabling and deleting them.
 */
class BlendingMethodManager
{
public:

    BlendingMethodManager();
    
    ~BlendingMethodManager();
    
    /**
     * Loads up defined methods.
     * Should be called AFTER the initialization of opengl.
     */
    void Initialize();
    
    /**
     * Adds a new blending method.
     * @param name 
     * @param sfactor
     * @param dfactor
     */
    void AddMethod(BlendingMethodName name, GLenum sfactor, GLenum dfactor);
    
    /**
     * Enables the selected method.
     * @param method 
     */
    void EnableMethod(BlendingMethodName method);
    
private:
    BlendingMethodName activeMethod;
    BlendingMethod blendingTable[BLEND_ALL];
};

};
#endif	/* BLENDINGMETHODMANAGER_H */

